package cn.iocoder.yudao.module.erp.controller.admin.finance.vo.category;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 管理后台 - ERP 财务类别（付款/收款）VO
 *
 * @author 芋道源码
 */
@Data
@Schema(description = "管理后台 - ERP 增加财务类别 VO")
public class PRCategorySaveVO {

    @Schema(description = "类别类型（payment/receipt）", requiredMode = Schema.RequiredMode.REQUIRED, example = "payment")
    @NotBlank(message = "类别类型不能为空")
    @Pattern(regexp = "payment|receipt", message = "类别类型只能是 payment 或 receipt")
    private String pr;

    @Schema(description = "类别名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "办公采购")
    @NotBlank(message = "类别名称不能为空")
    private String name;

    @Schema(description = "关联的现金流编号", example = "1024")
    private Long cashFlow;

    @Schema(description = "父类别", example = "1", requiredMode = Schema.RequiredMode.REQUIRED)
    private long parent;
}